<?php


namespace app\api\controller;


use app\api\model\Score as ScoreModel;

class Score extends BaseController
{
    /**
     * 登录用户的积分
     */
    public function myScore()
    {
        $user_id = Session('user');
        $id = 1;
        $score = new ScoreModel();
        $score = $score->getScore($id);
        return $this->renderSuccess(compact('score'));
    }

    /**
     * 积分兑换
     *
     */
    public function changeScore()
    {
        $user_id = Session('user');
        $id = 1;
        $score = new ScoreModel();
        $score = $score->getScore($id);
        var_dump($score['user_score']);
    }
}